#include <stdio.h>
int add(int a,int b)
{
	return a+b;
}

int sub(int a,int b)
{
	return a-b;
}

int mul(int a,int b)
{
	return a*b;
}

int div(int a,int b)
{
	return a/b;
}

// 定义一个函数指针变量
int (*p)(int,int);

void main()
{
	p = add;
	printf("+:%d\n",p(1,2));
	p = sub;
	printf("-:%d\n",p(1,2));
	p = mul;
	printf("*:%d\n",p(1,2));
	p = div;
	printf("/:%d\n",p(1,2));
}